#ifndef VIEW_H
#define VIEW_H

#include <QLabel>
#include <QString>
#include <QPixmap>
#include <QCheckBox>

#include "ui_bimoscontrol.h"

#define COUNTOFCONNECTORS 14

class View : public QWidget
{
    Q_OBJECT



public:
    View(Ui::BimosControl* uiBimosWindow);
    Ui::BimosControl *ui;


    void setupActivityBox();
    void setupImagesForActivityBox();
    void loadImages();
    void setupImageRow(int gridRow);
    void setupValueRow(int gridRow);
    void setupRefAndTemp();


    void setupDebugging();
    QPixmap *inputActive;
    QPixmap *inputInactive;
    QLabel* activityLabels[15];
    QLabel* valueLabels[15];
    QLabel* placeholderLabels[8];

    // Choosing
    QCheckBox *displayBottle[COUNTOFCONNECTORS];
    QLabel* displayValues[COUNTOFCONNECTORS];
    QLabel* displayPressure[COUNTOFCONNECTORS];

    void setTextValues(int bottle, float value, float mult, float offset);



    // Drawing
    int oldYofConnector[COUNTOFCONNECTORS];
    void setupDrawingArea();
    void drawVoltValue(int conNumber, float value);
    QGraphicsScene *gsVolt;
    int oldX, newX, oldY;

    // variable to decide when the new x point is set.
    int lastConnectorActive;

public slots:
    void setLastConnectorActive(int con);


private:
    int valueLabelCounter;
    int labelCounter;
    int placeholderCounter;
};

#endif // View_H
